package com.atguigu.spzx.cloud.order.config;

import com.atguigu.spzx.cloud.order.Interceptor.AuthInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * BelongProject: springCloud
 * BelongPackage: com.atguigu.spzx.cloud.order.config
 * Description:
 *
 * @Author 段鑫涛
 * @Create 2025/5/26 21:13
 * @Version 1.0
 */
@Component
public class MyMvcConfig implements WebMvcConfigurer {

    @Autowired
    private AuthInterceptor authInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authInterceptor).addPathPatterns("/**");
    }
}
